package com.yonyou.isv.demo.openapi.api.tax;

import com.yonyou.isv.demo.openapi.api.BaseOpenApi;
import com.yonyou.isv.demo.openapi.api.OpenApiURL;
import com.yonyou.isv.demo.openapi.base.module.reponse.ApiDataArrayResponse;
import com.yonyou.isv.demo.openapi.base.module.reponse.ApiDataResponse;
import com.yonyou.isv.demo.openapi.base.module.reponse.ApiStringDataResonse;
import org.springframework.http.HttpEntity;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @Description 进项受票-报销台账
 * @Author jiaogjin
 * @Date 2022/4/26 17:17
 **/
@Component
public class ReimburseLedgerApi extends BaseOpenApi {

    public List<Map<String,Object>> verifyAndSave(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiDataArrayResponse apiDataArrayResponse = postForEntity(OpenApiURL.VERIFY_AND_SAVE, httpEntity, ApiDataArrayResponse.class);
        return getData(apiDataArrayResponse);
    }

    public List<Map<String,Object>> submitToStandingBook(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiDataArrayResponse apiDataArrayResponse = postForEntity(OpenApiURL.SUBMIT_TO_STANDING_BOOK, httpEntity, ApiDataArrayResponse.class);
        return getData(apiDataArrayResponse);
    }

    public String reimbursementInvoiceEntry(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.REIMBURSEMENT_INVOICE_ENTRY, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

    public String reimbursementInvoiceEntryCancel(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.REIMBURSEMENT_INVOICE_ENTRY_CANCEL, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

    public Map<String, Object> queryStandingBookDetail(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiDataResponse apiDataResponse = postForEntity(OpenApiURL.QUERY_STANDING_BOOK_DETAIL, httpEntity, ApiDataResponse.class);
        return getData(apiDataResponse);
    }

    public List<Map<String, Object>> ocrRecognise(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiDataArrayResponse apiDataArrayResponse = postForEntity(OpenApiURL.OCR_RECOGNISE, httpEntity, ApiDataArrayResponse.class);
        return getData(apiDataArrayResponse);
    }

    public String ocrSave(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.OCR_SAVE, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

    public List<Map<String, Object>> directSave(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiDataArrayResponse apiDataArrayResponse = postForEntity(OpenApiURL.DIRECT_SAVE, httpEntity, ApiDataArrayResponse.class);
        return getData(apiDataArrayResponse);
    }

    public String standingBookReimbursed(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.STANDING_BOOK_REIMBURSED, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

    public String invoiceViewUrl(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.INVOICE_VIEW_URL, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

    public String standingBookReimbursedCancel(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.STANDING_BOOK_REIMBURSED_CANCEL, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

    public String standingBookReimbursedDelete(HttpEntity<Map<String,Object>> httpEntity)
    {
        ApiStringDataResonse apiStringDataResonse = postForEntity(OpenApiURL.STANDING_BOOK_REIMBURSED_DELETE, httpEntity, ApiStringDataResonse.class);
        return getData(apiStringDataResonse);
    }

}
